/**
 * 商户管理API
 */
import request from '/@/utils/request';

export function readAllMerchant(params?: any) {
  return request({
    url: 'merchants',
    method: 'get',
    params,
  });
}

export function createMerchant(data: any) {
  return request({
    url: 'merchants',
    method: 'post',
    data,
  });
}

export function updateMerchant(id: string, data: any) {
  return request({
    url: `merchants/${id}`,
    method: 'patch',
    data,
  });
}

export function deleteMerchant(id: string) {
  return request({
    url: `merchants/${id}`,
    method: 'delete',
  });
}
